package com.tbit.manager.api;

import com.tbit.manager.api.dto.MachineOperationsStatDTO;
import com.tbit.manager.api.dto.MachineStatReturnDTO;
import com.tbit.manager.enums.ApiConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;

@FeignClient(name = ApiConstants.NAME)
public interface MachineOAApi {

    String PREFIX = ApiConstants.PREFIX + "/operationsAnalysis/machine";


    /**
     * @description: 获取产生订单的车辆折线表数据
     * @author: mo.shanyong
     * @date: 2025/3/4 9:25
     * @param: accountId 区域id
     * @param: startDate 开始时间
     * @param: endDate 结束时间
     * @return: java.util.List<com.tbit.manager.api.dto.MachineStatReturnDTO>
     */
    @GetMapping(value = PREFIX + "/getOrderCarLine")
    List<MachineStatReturnDTO> getOrderCarLineData(@RequestParam("accountId") Integer accountId, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime);

    /**
     * @description: 按照短、中、长获取车辆闲置折线图数据
     * @author: mo.shanyong
     * @date: 2025/3/4 9:29
     * @param: accountId 区域id
     * @param: startDate 开始时间
     * @param: endDate 结束时间
     * @return: com.tbit.uqbike.object.pojo.MachineOperationsStat
     */
    @GetMapping(value = PREFIX + "/getIdleCarLine")
    List<MachineOperationsStatDTO> getIdleCarLineData(@RequestParam("accountId") Integer accountId, @RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate);

    /**
     * @description: 获取计费车辆分布折线图数据
     * @author: mo.shanyong
     * @date: 2025/3/4 10:01
     * @param: accountId 区域id
     * @param: startDate 日期：2025-03-01
     * @param: endDate 日期：2025-03-01
     * @return: java.util.List<com.tbit.manager.api.dto.MachineStatReturnDTO>
     */
    @GetMapping( value =  PREFIX +"/getChargingCarLine")
    List<MachineStatReturnDTO> getChargingCarLineData(@RequestParam("accountId") Integer accountId, @RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate);

    /**
     * @description: 低电占比折线图
     * @author: mo.shanyong
     * @date: 2025/3/4 14:18
     * @param: accountId 区域id
     * @param: startDate 开始时间
     * @param: endDate 结束时间
     * @return: java.util.List<com.tbit.manager.api.dto.MachineStatReturnDTO>
     */
    @GetMapping(value = PREFIX + "/getBatteryLine")
    List<MachineStatReturnDTO> getBatteryLineData(@RequestParam("accountId") Integer accountId, @RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate);
}
